#ifndef IARMY_HPP
#define IARMY_HPP

#include "location.hpp"
//#include "igeneral.hpp"


struct igeneral;
struct advice: location
{
  // -1 оставить на месте 
  int direction;
  // вес (расстояние до цели) 255 - цели нет, можно двигать куда угодно
  int weight;
  // приоритет 0 - номинал, 1 - высокий
  int priority;
  
  // Пользоветельские
  int value;
  
  advice()
    : location()
    , direction(-1)
    , weight(255)
    , priority(-2)
    , value(0)
  {
  }
  
  explicit advice(int r, int c, int d = -1, int w = 255, int p = -2)
    : location(r, c)
    , direction(d)
    , weight(w)
    , priority(p)
    , value(0)
  {
  };

  explicit advice(location loc, int d = -1, int w = 255, int p = -2)
    : location(loc)
    , direction(d) 
    , weight(w)
    , priority(p)
    , value(0)
  {
  };

  advice(item itm, int d = -1, int w = 255, int p = -2)
    : location(itm)
    , direction(d) 
    , weight(w)
    , priority(p)
    , value(itm.value)
  {
  };
  /*
  operator bool () const 
  {
    return 
  }
  */
};



struct iarmy
{
  virtual ~iarmy() {}
  
  virtual void initialize(int rows, int colls) {};

  virtual size_t size() const {return 0;};
  virtual advice candidate() { return advice();};
  virtual void reconnaissance( igeneral* g) = 0;
  virtual advice variant( location loc ) { return advice(); };
  virtual void committed( location from, location to) {};
  
};

#endif
